<!DOCTYPE doctype PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">

<HTML>
  <HEAD>
    <META name="generator" content=
    "HTML Tidy for Java (vers. 2009-12-01), see jtidy.sourceforge.net">

    <TITLE>Debugger: Threads</TITLE>
    <META http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <LINK rel="stylesheet" type="text/css" href="help/shared/DefaultStyle.css">
  </HEAD>

  <BODY lang="EN-US">
    <H1><A name="plugin"></A>Debugger: Threads</H1>

    <DIV class="image">
      <IMG alt="" src="images/DebuggerThreadsPlugin.png">
    </DIV>

    <P>In general, a thread refers to a unit of concurrent execution within a target. Typically,
    each thread carries its own execution context, so this window provides a means of navigating
    those contexts. The window also plots a timeline showing thread lifespans, and displays a caret
    which can be used to navigate the current point in time. This window, the <A href=
    "help/topics/DebuggerStackPlugin/DebuggerStackPlugin.html">Stack</A> window, the <A href=
    "help/topics/DebuggerModelPlugin/DebuggerModelPlugin.html">Model</A> window, and the <A href=
    "help/topics/DebuggerListingPlugin/DebuggerListingPlugin.html">Dynamic Listing</A> window
    provide a complete trace navigation system.</P>

    <H2>Table Columns</H2>

    <UL>
      <LI>Name - the name or summary of the thread given by the debugger. If a name is not given,
      this is just an index or unique id assigned to the thread. This field can be modified, but it
      has no effect on the target.</LI>

      <LI>PC - the program counter of the thread. This is typically the address of the next
      instruction it will execute. If the debugger records frames, this is the PC of the innermost
      frame.</LI>

      <LI>Function - the name of the function containing the PC, if Ghidra has the corresponding
      module image imported, analyzed, and mapped.</LI>

      <LI>Module - the name of the module containing the PC. This column is hidden by default.</LI>

      <LI>SP - the stack pointer for the thread. If the debugger records per-frame registers, this
      is the SP from the innermost frame. This column is hidden by default.</LI>

      <LI>State - the thread's current state. Depending on what is reported by the debugger, this
      should be either RUNNING, STOPPED, or TERMINATED. It might also be ALIVE, if the debugger
      cannot determine whether or not it is running; or UNKNOWN, if the debugger has lost
      track.</LI>

      <LI>Plot - a graphical representation of the thread's lifespan. Threads which are alive will
      appear to extend to the end of time. Unlike other column headers, clicking and dragging in
      this one may navigate trace snapshots. To rearrange this column, hold <B>SHIFT</B> while
      dragging.</LI>

      <LI>Comment - a user-modifiable comment about the thread. This column is hidden by
      default.</LI>

      <LI>Path - the path of the thread object in the target's model. This is hidden by default.
      See the <A href="help/topics/DebuggerModelPlugin/DebuggerModelPlugin.html">Model</A>
      window.</LI>
    </UL>

    <H2>Navigating Threads</H2>

    <P>Double-clicking a thread in the table will <EM>activate</EM> that thread, i.e., it becomes
    the current thread throughout the Debugger UI, usually including the debugger's command-line
    interface. Notably, the <A href=
    "help/topics/DebuggerRegistersPlugin/DebuggerRegistersPlugin.html">Registers</A> window will
    display the activated thread's register values. <A href=
    "help/topics/DebuggerListingPlugin/DebuggerListingPlugin.html">Listing</A> windows with
    configured location tracking will re-compute that location with the thread's context and
    navigate to it.</P>
  </BODY>
</HTML>
